package org.idontknow.blocks;

class MoveOnto extends Command {

	MoveOnto(Block _from, Block _to) {
		super(_from, _to);
	}

	public void execute() {
		log.info("Begin of \"MoveOnto\" command");
		log.info("Returning blocks upon block " + blockFrom.getValue() + "...");
		cleanFrom();
		log.info("Returning blocks upon block " + blockTo.getValue() + "...");
		cleanTo();
		log.info("Moving blocks...");
		moveBlocksOver(blockFrom.getStackId(), blockTo.getStackId(), 1);
		System.out.println("-------- Command: move " + blockFrom.getValue()
				+ " onto " + blockTo.getValue() + " --------");
		printStacks();
		log.info("End of \"MoveOnto\" command\n\n----------------------------------------");
	}
}
